# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1137 -> 1.1138 # mm/memory.c 1.125 -> 1.126 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/13 davidm@tiger.hpl.hp.com 1.1138 # memory.c: # Undo last change. # -------------------------------------------- # diff -Nru a/mm/memory.c b/mm/memory.c --- a/mm/memory.c Sun Jun 15 00:37:36 2003 +++ b/mm/memory.c Sun Jun 15 00:37:36 2003 @@ -714,7 +714,8 @@ if (!pmd) return i ? : -EFAULT; pte = pte_offset_kernel(pmd, pg); - if (!pte || !pte_present(*pte) || write) + if (!pte || !pte_present(*pte) || !pte_user(*pte) || + !(write ? pte_write(*pte) : pte_read(*pte))) return i ? : -EFAULT; if (pages) { pages[i] = pte_page(*pte);